

#ifndef	E_LOG
#define	E_LOG

#include "FileUtils/String.h"



#define		LOGGER(X)		{	\
								utils::sysLog << X << logEndl;\
								\
							}
namespace gengine
{
namespace utils
{
class	LogManipulator
{
public:
	LogManipulator () {}
};


class	Log 
{
private:
	String	buf;
	String	fileName;
public:
	Log ( const String& theFileName = "EngineLog.txt" );
	
	Log& operator << ( const String& str )
	{
		buf += str;

		return *this;
	}

	Log& operator << ( const char * str )
	{
		buf += str;

		return *this;
	}

	Log& operator << ( char ch )
	{
		//buf += ch;

		return *this;
	}

	Log& operator << ( bool v )
	{
		if ( v )
			buf += "true";
		else
			buf += "false";

		return *this;
	}

	Log& operator << ( int v );
	Log& operator << ( float v );
	Log& operator << ( const Vector3D& v );
	Log& operator << ( const LogManipulator& man );

	

protected:
	void	flush ();				
};

extern const LogManipulator	  logEndl;
extern Log             sysLog;





};
}
#endif
